package cn.ad.server.persistence;

import javax.annotation.Resource;

import org.springframework.data.redis.core.ValueOperations;
import org.springframework.stereotype.Repository;

import cn.ad.server.domain.ad.AreaPlatformMap;
import cn.ad.server.domain.ad.PlatformTagSizeMap;

@Repository
public class AreaPlatformMapRepositoryImp implements AreaPlatformMapRepository {

	@Resource(name = "cacheRedisTemplate")
	private ValueOperations<String, PlatformTagSizeMap> platformTagSizeMapValueOperations;
	
	@Resource(name = "cacheRedisTemplate")
	private ValueOperations<String, AreaPlatformMap> areaPlatformMapValueOperations;
	

	@Override
	public AreaPlatformMap fetchAreaPlatformMapByTargetId(int targetId) {
		return areaPlatformMapValueOperations.get(AreaPlatformMap.cacheKey(targetId));
	}
	
}
